package com.zhanyf.heilan.cg.util;

import org.apache.shiro.SecurityUtils;

import com.zhanyf.heilan.cg.domain.User;

public class ShiroUtil {
	public static User getCurrentUser() {
		return (User) SecurityUtils.getSubject().getSession().getAttribute("user");
	}

	public static void setCurrentUser(User user) {
		SecurityUtils.getSubject().getSession().setAttribute("user", user);
	}

}
